<!DOCTYPE HTML>
<html>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <head>Unitary Testing Page </head>
    <script type="text/javascript" src="appframework.js"></script>
    <script type="text/javascript" src="js/Core/Core.js"></script>
    <script type="text/javascript" src="js/Core/SQLProvider.js"></script>
    <script type="text/javascript" src="js/Core/PersonProfileTable.js"></script>
    <script type="text/javascript" src="js/Core/UserToPersonTable.js"></script>
    <script type="text/javascript" src="js/Util/Util.js"></script>
    <script type="text/javascript" src="js/Control/PersonProfileCtrl.js"></script>
    <script type="text/javascript" src="js/Control/UserToPersonCtrl.js"></script>

      <script type = "text/javascript" >

     	$N.databaseSet.UserToPersonTable.init();
     	$N.databaseSet.PersonProfileTable.init();
     	//$N.databaseSet.UsersTable.init();

     	function showPersonProfile(personProfile) {
     		//personProfiles.push(personProfile);
     		var item = '<li><a href="#healthInputDataList"><img src="images/img2.jpg" />' + personProfile.name + '</a></li>';
     		$("#myTestList").append($.create(item));
     	}
        
        $N.ctrl.UserToPersonCtrl.registerClientNotify($N.ctrl.PersonProfileCtrl.getPersonProfileData);
     	$N.ctrl.PersonProfileCtrl.registerClientNotify(showPersonProfile);

     	$N.ctrl.UserToPersonCtrl.getUserToPersonData();
        
        function dropTables() {
            $N.databaseSet.dropTable("PersonProfile");
            $N.databaseSet.dropTable("UserToPerson");
        }
     </script>
    <body>
        <input type="button" onclick="dropTables();" value="Test Button"></input>
        <div id="test">Hello World</div>
        <ul id="myTestList"></ul>
    </body>	
</html>
